pp108 : Binding Data to Controls

Binding Data to Controls

This topic describes the procedure to bind data to controls.

You can associate controls with models to display data (parameter values of model's business objects) in an XForm.

  1. Open the XForm in the XForms Designer.

    Note:
    The XForm must be associated with at least one model to enable binding of data. For information on how to associate models with an XForm, see Adding and Associating Multiple Models.

  2. Drag a control from the Toolbox tab to the Designer Area to add it to the XForm.
  3. Right-click the control and select Properties. Alternatively, double-click the control. The <control> window appears.
  4. Select an option from the Model drop-down list to specify the model from which to bind data.

    Note:
    This option is not mandatory if a parent control is associated with a model. In such a case, the control is automatically associated to the parent control's model.

  5. Click in the References field. The Response - <model> - References dialog box appears, displaying the data nodes available for association in the specified model.
  6. Select the data node to associate with the control and click OK.

    Restriction
    For non-transactional models and for transactional models returning complex XML data (containing multiple levels of nodes), you must manually specify the complete XPath in the References field. For information about referencing non-transactional data see, Referencing Transactional and Non-transactional Data.

    The selected data node is displayed in the References field.
  7. Select an option from the Parent drop-down list to specify the parent view from which data is displayed in the control. This option is available only for the Table, Tab Page, Groupbox, and Group grouping controls. This step is optional. If you specify a parent view, the Reference XPath is evaluated on the parent view's active business object, that is the reference is picked with respect to the specified parent view, instead of considering the complete XPath.
  8. Click .

The settings specified for binding data to the control are saved.

Data bound to composite controls displays in its child controls, as relevant. However, data bound to primitive controls displays only in the specific control; for example, data bound to a Button control displays in it as text.

Related reference

Referencing Transactional and Non-Transactional Data
Transactional and Non-transactional Data